package main

import "fmt"

func getSum() func(int) int {
	var n = 10
	return func(num int) int {
		n += num
		return n
	}
}
func main() {
	sum := getSum()
	num := sum(10)
	fmt.Println(num)
	fmt.Println(sum(10))
	fmt.Println(sum(10))
	fmt.Println(sum(10))
	fmt.Println(sum(10))
}
